package com.aqie.advanced.automatic.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;

import java.util.stream.Stream;

@Service
@Profile("Java11")
@Slf4j
public class LambdaCalculateService implements CalculateService {
    @Override
    public Integer sum(Integer... values) {
        log.info("java ll sum");
        return Stream.of(values).reduce(0, Integer::sum);
    }
}
